package com.neiquan.weiguan.fragment;

import android.view.LayoutInflater;
import android.view.View;
import android.widget.CheckBox;
import android.widget.CompoundButton;
import android.widget.ImageView;
import android.widget.LinearLayout;
import android.widget.RelativeLayout;
import android.widget.TextView;

import com.neiquan.weiguan.R;
import com.neiquan.weiguan.activity.ContainerActivity;
import com.neiquan.weiguan.fragment.base.AppBaseFragment;

import butterknife.ButterKnife;
import butterknife.InjectView;
import butterknife.OnClick;

/**
 * Created by wyl on 2016/7/2.
 * 我的--->设置
 */
public class SetUpFragment extends AppBaseFragment implements CompoundButton.OnCheckedChangeListener {
    @InjectView(R.id.back_img)
    ImageView mBackImg;
    @InjectView(R.id.back_tv)
    TextView mBackTv;
    @InjectView(R.id.ly_back)
    LinearLayout mLyBack;
    @InjectView(R.id.title_tv)
    TextView mTitleTv;
    @InjectView(R.id.next_tv)
    TextView mNextTv;
    @InjectView(R.id.next_img)
    ImageView mNextImg;
    @InjectView(R.id.head_view)
    RelativeLayout mHeadView;
    @InjectView(R.id.lin_setup_fragment_title)
    LinearLayout mLinSetupFragmentTitle;
    @InjectView(R.id.lin_setup_fragment_myaccount)
    LinearLayout mLinSetupFragmentMyaccount;
    @InjectView(R.id.text_cache)
    TextView mTextCache;
    @InjectView(R.id.lin_setup_fragment_clear)
    LinearLayout mLinSetupFragmentClear;
    @InjectView(R.id.text_five_Item_right)
    TextView mTextFiveItemRight;
    @InjectView(R.id.check_push)
    CheckBox mCheckPush;
    @InjectView(R.id.lin_setup_fragment_push)
    LinearLayout mLinSetupFragmentPush;
    @InjectView(R.id.text_version)
    TextView mTextVersion;
    @InjectView(R.id.lin_setup_fragment_version)
    LinearLayout mLinSetupFragmentVersion;
    @InjectView(R.id.lin_setup_fragment_help)
    LinearLayout mLinSetupFragmentHelp;

    @Override
    public View initRootView() {
        rootView = LayoutInflater.from(getContext()).inflate(R.layout.fragment_setup, null);
        ButterKnife.inject(this, rootView);
        return rootView;
    }

    @Override
    public void setViews() {
        setTitleTv("设置");
        mCheckPush.setOnCheckedChangeListener(this);
    }

    @Override
    public void initData() {

    }

    @OnClick({R.id.lin_setup_fragment_myaccount, R.id.lin_setup_fragment_clear, R.id.lin_setup_fragment_push, R.id.lin_setup_fragment_version, R.id.lin_setup_fragment_help})
    public void onClick(View view) {
        switch (view.getId()) {
            case R.id.lin_setup_fragment_myaccount:
                ContainerActivity.startActivity(getContext(), PersonalDataFragment.class, null);
                break;
            case R.id.lin_setup_fragment_clear:
                break;
            case R.id.lin_setup_fragment_push:
                break;
            case R.id.lin_setup_fragment_version:
                break;
            case R.id.lin_setup_fragment_help:
                break;
        }
    }

    @Override
    public void onCheckedChanged(CompoundButton buttonView, boolean isChecked) {
        switch (buttonView.getId()) {
            case R.id.check_push:

                break;
        }
    }
}
